package cn.com.huzo.model.entities.trade;

import huzofw.model.entities.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 化检日记账明细合格证主记录实体类
 * <p>
 * @author 范学春
 */
public class InspectionJournalLinesCertificationHeaderEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 6968229124514898213L;
    private String LinesId;
    private Long HeaderId;
    private Long Sender;
    private String SenderName;
    private String Receiver;
    private Timestamp DateOfSend;
    private String CertificationNo;           // 
    private String IsFinal;                   // 是否最终合格证
    private String Description;               // 备注

    public String getLinesId() {
        return LinesId;
    }

    public void setLinesId(String LinesId) {
        this.LinesId = LinesId;
    }

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public Long getSender() {
        return Sender;
    }

    public void setSender(Long Sender) {
        this.Sender = Sender;
    }

    public String getSenderName() {
        return SenderName;
    }

    public void setSenderName(String SenderName) {
        this.SenderName = SenderName;
    }

    public String getReceiver() {
        return Receiver;
    }

    public void setReceiver(String Receiver) {
        this.Receiver = Receiver;
    }

    public String getCertificationNo() {
        return CertificationNo;
    }

    public void setCertificationNo(String CertificationNo) {
        this.CertificationNo = CertificationNo;
    }

    public String getIsFinal() {
        return IsFinal;
    }

    public void setIsFinal(String IsFinal) {
        this.IsFinal = IsFinal;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    public void setDateOfSend(Timestamp DateOfSend) {
        this.DateOfSend = DateOfSend;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getDateOfSend() {
        return DateOfSend;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof InspectionJournalLinesCertificationHeaderEntity)) {
            return false;
        }

        final InspectionJournalLinesCertificationHeaderEntity that = (InspectionJournalLinesCertificationHeaderEntity) o;

        return new EqualsBuilder()
                .append(this.getLinesId(), that.getLinesId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getLinesId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
